package cn.edu.ctgu;

import java.time.LocalDate;

public class YesterDate {
    public  String dateCalculator(int year, int month, int day) {
        // 创建一个 LocalDate 对象表示输入的日期
        LocalDate inputDate = LocalDate.of(year, month, day);
        System.out.print("输入的日期: " + inputDate.toString()+"  ");
        // 计算前一天的日期
        LocalDate previousDay = inputDate.minusDays(1);

        // 返回前一天的日期字符串
        return previousDay.toString();
    }
}
